package com.gzit.view.tag;

import java.util.ArrayList;
import java.util.List;

import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

public class TagDataAdapter extends BaseAdapter {

	private List<TagItem> tags = new ArrayList<TagItem>();

	public List<TagItem> getTags() {
		return tags;
	}

	private TagItem genFakeItem() {
		TagItem fakeItem = new TagItem("添加标签");
		fakeItem.setFake(true);
		fakeItem.setDeletable(false);
		return fakeItem;
	}

	public void loadTags(List<TagItem> tags) {
		this.tags = tags;
		this.notifyDataSetChanged();
	}

	@Override
	public int getCount() {
		return tags.size();
	}

	@Override
	public Object getItem(int position) {
		return tags.get(position);
	}

	@Override
	public long getItemId(int position) {
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		return null;
	}

}
